import request from '@/utils/request'

export function getServiceList(params) {
  return request({
    url: '/beautyService',
    method: 'get',
    params
  })
}

export function getMaterialList() {
  return request({
    url: '/material/getList',
    method: 'get'
  })
}

export function getServiceInfo(id) {
  return request({
    url: '/beautyService',
    method: 'get',
    params: {
      id: id
    }
  })
}

export function addService(data) {
  return request({
    url: '/beautyService',
    method: 'post',
    data
  })
}

export function modifyService(id, data) {
  return request({
    url: '/beautyService',
    method: 'put',
    params: {
      id: id
    },
    data
  })
}

export function getStockMaterial(name) {
  return request({
    url: '/stock',
    method: 'get',
    params: {
      name: name
    }
  })
}

export function addOrder(data) {
  return request({
    url: '/order',
    method: 'post',
    data
  })
}

